/*Author : Rozi Kapara Dista*/

package jtk.project4.fleet.field;

import java.awt.Dimension;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.TableField.AutoResizeMode;
import nl.coderight.jazz.form.field.button.CheckButton;
import nl.coderight.jazz.form.field.SelectField;
import nl.coderight.jazz.form.field.TableField;

public class RepairTableField extends GroupControl{
	private TableField repairTable;
	
	public RepairTableField(String bindID){
		setTitle("header.EditScheduleRepair");
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	private void createFields(){
		repairTable = new TableField("equipments","equipment");
		repairTable.setTitle("equipment.header.table");
		repairTable.setAutoResizeMode(AutoResizeMode.AUTOFIT);
		repairTable.getSelectionValues();
		
		//add columns
		repairTable.addColumn("Repair","repair");
		repairTable.addColumn("Type","type");
		repairTable.addColumn("Comments","comments");
	}
	
	private void createLayout() {
		addField(createFieldGroup(), CENTER);
	}
	
	private GroupControl createFieldGroup(){
		GroupControl fieldGroup=new GroupControl();
		fieldGroup.addField(repairTable, CENTER);
		return fieldGroup;
	}
	
}
